'''
@Company: TWL
@Author: xue jian
@Email: xuejian@kanzhun.com
@Date: 2020-04-09 19:42:53
'''
# -*- coding: UTF-8 -*-

f_path = "/Users/zrzn/Desktop/"
# f_path = '/data1/home/zangruozhou/'
# dates = ["2019-05-16", "2019-05-17", "2019-05-18", "2019-05-19", "2019-05-20"]
dates = ["2019-05-15"]
# f = open('/Users/zrzn/Desktop/2019-05-15.merge', 'r')

for date in dates:
    f_new = open(f_path + date + '.merge', 'r')
    num = 1
    fs = []
    for i in range(num):
        fs.append(open(f_path + "merge_train_data/" + date + "/part" + str(i), 'w'))

    for j, line in enumerate(f_new):
        tmp = j % num
        fs[tmp].write(line)(py_3_work) 